import type { RouteRecordRaw } from 'vue-router';

// layout 布局
const Layout = () => import('@/layout/index.vue');
// 显示
const MapView = () => import('@/views/map/view/index.vue');
// 绘制图形
const DrawGraph = () => import('@/views/map/drawGraph/index.vue');
// GeoJson
const GeoJson = () => import('@/views/map/geoJSON/index.vue');
// 热力图
const HeatMap = () => import('@/views/map/heatMap/index.vue');
// 轨迹移动
const movement = () => import('@/views/map/movement/index.vue');
// 水流模拟
const snakeanim = () => import('@/views/map/snakeanim/index.vue');
// 蚂蚁路径
const ant = () => import('@/views/map/ant/index.vue');

const routes: RouteRecordRaw = {
	path: '/map',
	name: 'mapLayout',
	redirect: '/map/view',
	component: Layout,
	meta: {
		title: 'router.map',
		icon: 'diqiu',
		index: '/map',
	},
	children: [
		{
			path: '/map/view',
			name: 'mapViewRouter',
			component: MapView,
			meta: {
				title: 'router.mapView',
				icon: 'marker',
				index: '/map/view',
			},
		},
		{
			path: '/map/drawgraph',
			name: 'mapDrawGraphRouter',
			component: DrawGraph,
			meta: {
				title: 'router.drawgraph',
				icon: 'huizhi',
				index: '/map/drawgraph',
			},
		},
		{
			path: '/map/geojson',
			name: 'mapGeoJSONRouter',
			component: GeoJson,
			meta: {
				title: 'router.geojson',
				icon: 'json',
				index: '/map/geojson',
			},
		},
		{
			path: '/map/heatmap',
			name: 'mapHeatMapRouter',
			component: HeatMap,
			meta: {
				title: 'router.heatmap',
				icon: 'relitu',
				index: '/map/heatmap',
			},
		},
		{
			path: '/map/movement',
			name: 'mapMovementRouter',
			component: movement,
			meta: {
				title: 'router.movement',
				icon: 'guiji',
				index: '/map/movement',
			},
		},
		{
			path: '/map/snakeanim',
			name: 'mapSnakeanimRouter',
			component: snakeanim,
			meta: {
				title: 'router.snakeanim',
				icon: 'shuiliu',
				index: '/map/snakeanim',
			},
		},
		{
			path: '/map/ant',
			name: 'mapAntRouter',
			component: ant,
			meta: {
				title: 'router.ant',
				icon: 'mayi',
				index: '/map/ant',
			},
		},
	],
};

export default routes;
